<?php

abstract class Jf_Controller_Action_Customer extends Jf_Controller_Action_Abstract {

    public function initViewScriptPath () {
        $template = 'default';
        $module = $this -> getRequest () -> getModuleName ();
        $appPath = Jf_Global::get ('directory');
        $scriptPath = $appPath . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . $template;
        $templatePath = $scriptPath . DIRECTORY_SEPARATOR . strtolower ($module);
        $this -> getView () -> setScriptPath ($templatePath);
        if ($this -> getRequest () -> isGet () &&  ! $this -> getRequest () -> isXmlHttpRequest ()) {
            $layoutPath = $scriptPath . DIRECTORY_SEPARATOR . '_layouts';
            $layout = $this -> getPlugin ('layout');
            $layout -> setLayoutPath ($layoutPath) -> setLayout ('customer.phtml');
        }
    }

}

